﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StoragePeriod.IDAL.FoodTesting;
using StoragePeriod.DALFactory;
using StoragePeriod.Model.FoodTesting;

namespace StoragePeriod.BLL.FoodTesting
{
    /// <summary>
    /// 矿物质含量
    /// </summary>
    public class T_MineralData
    {
        I_MineralData dal = new DataAccess<I_MineralData>().CreateInstance("FoodTesting.D_MineralData");

        /// <summary>
        /// 获取检查数据实体
        /// </summary>
        /// <param name="eVcData">查询ID</param>
        /// <returns>返回对应的实体</returns>
        public E_MineralData GetDataEntityById(E_MineralData eMineralData)
        {
            return dal.GetDataEntityById(eMineralData);
        }

        /// <summary>
        /// 根据原料ID和检测时间 删除检测记录
        /// </summary>
        /// <param name="eVcData">要删除的检测记录</param>
        /// <returns></returns>
        public int RemoveByTime(E_MineralData eMineralData)
        {
            return dal.RemoveByTime(eMineralData);
        }

        /// <summary>
        /// 根据原料ID 和检测时间 获取所有的检测记录
        /// </summary>
        /// <param name="eVcData">要获取的检测记录</param>
        /// <returns></returns>
        public List<E_MineralData> GetDataListByTime(E_MineralData eMineralData)
        {
            return dal.GetDataListByTime(eMineralData);
        }

        /// <summary>
        /// 删除某一次检测记录
        /// </summary>
        /// <param name="eVcData">要删除的检测记录</param>
        /// <returns></returns>
        public int RemoveByFoodNum(E_MineralData eMineralData)
        {
            return dal.RemoveByFoodNum(eMineralData);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(E_MineralData eMineralData)
        {
            return dal.Add(eMineralData);
        }
    }
}
